
#include "Tools\RGBColor.h"


RGBColor::RGBColor(FLOAT r, FLOAT g, FLOAT b)
	: m_r(r),
	  m_g(g),
	  m_b(b)
{
}


RGBColor::~RGBColor()
{
}


RGBColor::RGBColor(CONST RGBColor& other)
	: m_r(other.m_r),
	  m_g(other.m_g),
	  m_b(other.m_b)
{
}


RGBColor& RGBColor::operator = (CONST RGBColor& other)
{
	// Self-assignement.
	if(this == &other)
		return *this;

	// Copy.
	m_r = other.m_r;
	m_g = other.m_g;
	m_b = other.m_b;

	return *this;
}


RGBColor RGBColor::Aqua()
{
	return RGBColor(0, 1, 1);
}


RGBColor RGBColor::Black()
{
	return RGBColor(0, 0, 0);
}


RGBColor RGBColor::Blue()
{
	return RGBColor(0, 0, 1);
}


RGBColor RGBColor::Fuchsia()
{
	return RGBColor(1, 0, 1);
}


RGBColor RGBColor::Green()
{
	return RGBColor(0, 0.5f, 0);
}


RGBColor RGBColor::Lime()
{
	return RGBColor(0, 1, 0);
}


RGBColor RGBColor::Maroon()
{
	return RGBColor(0.5f, 0, 0);
}


RGBColor RGBColor::Navy()
{
	return RGBColor(0, 0, 0.5f);
}


RGBColor RGBColor::Olive()
{
	return RGBColor(0.5f, 0.5f, 0);
}


RGBColor RGBColor::Purple()
{
	return RGBColor(0.5f, 0, 0.5f);
}


RGBColor RGBColor::Red()
{
	return RGBColor(1, 0, 0);
}


RGBColor RGBColor::Silver()
{
	return RGBColor(0.75f, 0.75f, 0.75f);
}


RGBColor RGBColor::Teal()
{
	return RGBColor(0, 0.5f, 0.5f);
}


RGBColor RGBColor::White()
{
	return RGBColor(1, 1, 1);
}


RGBColor RGBColor::Yellow()
{
	return RGBColor(1.0f, 1.0f, 0);
}


FLOAT RGBColor::GetR() CONST
{
	return m_r;
}


VOID RGBColor::SetR(FLOAT r)
{
	m_r = r;
}


FLOAT RGBColor::GetG() CONST
{
	return m_g;
}


VOID RGBColor::SetG(FLOAT g)
{
	m_g = g;
}


FLOAT RGBColor::GetB() CONST
{
	return m_b;
}


VOID RGBColor::SetB(FLOAT b)
{
	m_b = b;
}
